package com.zhejiangzhengyuan.municipal_common.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.sql.Timestamp;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 系统日常日志表，记录系统中产生的警告以及异常信息
 * </p>
 *
 * @author linju
 * @since 2019-11-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="ExceptionLog对象", description="系统日常日志表，记录系统中产生的警告以及异常信息")
public class ExceptionLog extends Model<ExceptionLog> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "自增主键")
    @TableId(value = "id",type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "认证主体名称")
    private String subjectName;

    @ApiModelProperty(value = "访问URL")
    private String url;

    @ApiModelProperty(value = "异常等级：warn、error")
    private String level;

    @ApiModelProperty(value = "异常发生位置：记录异常发生位置的全类名以及代码行数，尽可能详细定位")
    private String position;

    @ApiModelProperty(value = "记录异常类型的全类名")
    private String type;

    @ApiModelProperty(value = "异常记录的message数据")
    private String message;

    @ApiModelProperty(value = "记录异常数据的解析版本")
    private Integer version;

    @ApiModelProperty(value = "记录创建时间")
    private Timestamp createTime;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
